API Documentation
String.h
1 // String.h
3 //
5 
6 namespace nkMemory
7 {
21  class String final
22  {
23  public :
24 
29  String () ;
36  String (const char* data) ;
43  String (unsigned long long size) ;
52  String (const char* data, unsigned long long size) ;
59  String (const StringView& view) ;
65  String (const String& other) ;
71  String (String&& other) noexcept ;
75  ~String () ;
76 
77  // Getters
81  char* getData () const ;
85  unsigned long long getSize () const ;
89  bool empty () const ;
93  char& front () ;
97  char& back () ;
98 
99  // Management
103  void clear () ;
110  void resize (unsigned long long size) ;
111 
112  // Operators
118  String& operator= (const char* data) ;
124  String& operator= (const StringView& other) ;
130  String& operator= (const String& other) ;
136  String& operator= (String&& other) noexcept ;
142  const char operator[] (unsigned long long index) const ;
148  char& operator[] (unsigned long long index) ;
154  void operator+= (char value) ;
160  void operator+= (const StringView& other) ;
173  bool operator== (const char* other) ;
179  bool operator== (const String& other) ;
185  bool operator== (const StringView& other) ;
186 
187  public :
188 
189  // Inlined constructors
196  String (const std::string& str) ;
203  String (const std::string_view& str) ;
204 
205  public :
206 
207  // Inlined operators
211  operator std::string () const ;
215  operator std::string_view () const ;
216  } ;
217 }
nkMemory::String::String
String(const char *data)
nkMemory::String::String
String(const std::string_view &str)
nkMemory::String::operator==
bool operator==(const char *other)
nkMemory::String::back
char & back()
nkMemory::String::front
char & front()
nkMemory::String::String
String(const std::string &str)
nkMemory::String::String
String(const String &other)
nkMemory::String::String
String(const StringView &view)
nkMemory::String::empty
bool empty() const
nkMemory::String::operator[]
const char operator[](unsigned long long index) const
nkMemory::String::operator+
nkMemory::String operator+(const StringView &other)
nkMemory::String
Class holding information about a string, with ownership over the data.
Definition: String.h:22
nkMemory::String::~String
~String()
nkMemory::StringView
Class holding information about a string, with no ownership over the data.
Definition: StringView.h:22
nkMemory::String::String
String(unsigned long long size)
nkMemory::String::clear
void clear()
nkMemory::String::operator+=
void operator+=(char value)
nkMemory::String::String
String(const char *data, unsigned long long size)
nkMemory::String::getData
char * getData() const
nkMemory::String::resize
void resize(unsigned long long size)
nkMemory::String::String
String()
nkMemory::String::getSize
unsigned long long getSize() const
nkMemory::String::operator=
String & operator=(const char *data)
nkMemory::String::String
String(String &&other) noexcept
nkMemory
Encompasses all API of component NilkinsMemory.
Definition: Allocator.h:7